<template>
  <view v-if="shenheStatus == 0" class="integral">
    <text class="count">{{ integral }}</text>
    <view
      class="toDetail"
      @click="$utils.toUrl('/integral/integral/myIntegralDetail', 'navigate')"
    >
      <text>{{ $t('integral.viewDetails') }}</text>
      <text class="iconfont icon-arrow-right"></text>
    </view>
    <text
      class="btn"
      @click="$utils.toUrl('/integral/integral/integral', 'navigate')"
      v-if="stores.is_alliance == 1"
      >{{ $t('integral.mall') }}</text
    >
  </view>
  <Shenhe v-else-if="shenheStatus == 1"></Shenhe>
</template>

<script>
import Shenhe from '@/components/shenhe/shenhe';
export default {
  components: { Shenhe },
  data() {
    return {
      integral: 0,
    };
  },
  onLoad(e) {
    uni.setNavigationBarTitle({
      title: `我的${this.stores.integral_name}`,
    });
    this.integral = e.integral;
  },
};
</script>

<style lang="scss" scoped>
.integral {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: PingFang SC;
  padding-top: 100rpx;
  .count {
    font-size: 80rpx;
    font-weight: 600;
    color: #262626;
  }
  .toDetail {
    display: flex;
    align-items: center;
    font-size: 28rpx;
    color: #8c8c8c;
    margin-top: 28rpx;
    .iconfont {
      font-size: 22rpx;
    }
  }
  .btn {
    width: 680rpx;
    height: 88rpx;
    border-radius: 999px;
    margin: 80rpx auto 0 auto;
    background-color: #f0250e;
    font-size: 28rpx;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
</style>
